package com.suli.multimedia.config;

import lombok.extern.slf4j.Slf4j;
import org.ehcache.event.CacheEvent;
import org.ehcache.event.CacheEventListener;

/**
 * @author SuLi
 * @version 1.0 <br/>
 * <p style="font-family:SimSun;font-weight:bold">时间:<br/>2022/3/26 10:10</p>
 */

@Slf4j
public class ArticleCacheEventLogger implements CacheEventListener<Object,Object> {

    @Override
    public void onEvent(CacheEvent cacheEvent) {

        log.info("person caching event {} {} {} {}",

                cacheEvent.getType(),

                cacheEvent.getKey(),

                cacheEvent.getOldValue(),

                cacheEvent.getNewValue());

    }

}
